.model small 
.data
       array dw  -1,-3,0,1,0,100,0FFFEH,90H,90,100H
       count equ ($-array)/2
       
.stack        
       dw 8 dup(?)

.code
           
subr  proc far
       push ds
       sub  ax, ax
       push ax
       mov  ax, @data
       mov  ds, ax
       mov es,ax          
       mov  bx, 0
       mov  dx, 0
       mov  si, 0
       lea  di, array
       mov  cx, count
       cld
        mov ax,0             
again:
       scasw
       jz   p1
       js   p2
       inc  si
       loop again
       jmp  exit
p1:
   inc  bx
       loop again
       jmp  exit
p2:
       inc  dx
       loop again
exit: 
ret
  subr endp         

end subr         

